﻿using Architecture.Domain;
using Architecture.Repository.Interface;
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace Architecture.Repository.Impl
{
    /// <summary>
    /// 
    /// </summary>
    public class LeaveRepository : BaseRepository<RequestForLeave>, ILeaveRepository
    {
        /// <summary>
        /// 构造函数
        /// </summary>
        /// <param name="context">数据库上下文</param>
        public LeaveRepository(EFCoreContext context) : base(context)
        {

        }

        /// <summary>
        /// 添加请假
        /// </summary>
        /// <param name="requestForLeave">请假实体</param>
        /// <returns>返回受影响的行数</returns>
        public async Task<int> AddLeaves(RequestForLeave requestForLeave)
        {
            return await base.AddAsync(requestForLeave);
        }

    }
}
